//
// Created by longyunbo on 6/23/21.
//

#ifndef ANALYSIS_CLASSFILEPARSER_H
#define ANALYSIS_CLASSFILEPARSER_H
#include "../oops/InstanceKlass.h"
#include <stdio.h>
#include <stdlib.h>
#include "../../tool/DataTranslate.h"
#include "../oops/BytecodeStream.h"
#include "stdlib.h"
#include "../oops/LineNumberTable.h"
#include "../oops/LocalVariableTable.h"

using namespace std;




struct ClassFileParser {




public:
    InstanceKlass* parseClassFile(FILE* fw);

    //解析方法
    void parseMenthod( InstanceKlass* in , FILE* fw );

    //解析常量池
    void parseConstantPool( InstanceKlass* in , FILE* fw );

    void parseInterface( InstanceKlass* in , FILE* fw  );

    void parseFile( InstanceKlass* in , FILE* fw );

    void parseLineNumberTable(InstanceKlass* in , FILE* fw , CodeAttributeInfo* codeAttributeInfo , short attribute  );

    void parseLocalVariableTable(InstanceKlass* in , FILE* fw , CodeAttributeInfo* codeAttributeInfo , short attribute );
};


#endif //ANALYSIS_CLASSFILEPARSER_H
